const { savePageHtml } = require("./crawl/byplaywright");
// const cleanHtml = require("./converter");
const { cleanHtml } = require("./easyclean");

const link =
  //   "https://epaper.hubeidaily.net/pad/content/202407/16/content_280977.html";
  "https://www.hbgyl.com.cn/#/index";

(async () => {
  const html = await savePageHtml(link, "page.html");
  const start = Date.now();
  // const cleanedHtml = cleanHtml(html, "page_cleaned.html");
  const cleanedHtml = cleanHtml(html);
  console.log(cleanedHtml);
  console.log("\ncostTime:", Date.now() - start, "ms");
})();
